<?php
/*
BEGIN INSTANT INSTALL META
  	Name: WordPress
	Version: 2.7.1
	Publisher: Automattic Inc.
END META
*/
require('../installer.php');
class wordpress extends installer
{
	function move_wordpress($from)
	{
		# move wordpress to the current directory
		if (stristr(php_os, 'WIN')) 
		{ 
			system("move $from/wordpress/* .");
			system("rmdir $from/wordpress");
		} 
		else 
		{ 
			system("mv $from/wordpress/* .");
			system("rmdir $from/wordpress");
		}
	}
	function redirecttoinstaller()
	{
		header("Location: wp-admin/install.php");
	}
	function install()
	{
		$this->filename = 'latest.zip';
		$this->archivelocation = 'http://wordpress.org/latest.zip';
		$this->name = 'WordPress';
		$this->archivetype = 'zip';
		$this->extract_files('tmp');
		$this->move_wordpress('tmp');
		$this->redirecttoinstaller();
	}
}
$wordpress = new wordpress;
$wordpress->install();
?>